package sketch.generator.experiment;

import java.util.Collection;

import sketch.generator.NondetValueGenerator;

public class NondetValueGroupGenerator<T> extends ValueGroupGenerator<T> {

	public final NondetValueGenerator<T> generator;
	
	public NondetValueGroupGenerator(T...ts) {
		generator = new NondetValueGenerator<T>(ts);
	}
	
	public NondetValueGroupGenerator(Collection<T> ts) {
		generator = new NondetValueGenerator<T>(ts);
	}
	
	@Override
	public void reset() {
		super.reset();
		this.generator.reset();
	}
	
	@Override
	public boolean hasNext() {
		return generator.hasNext();
	}

	@Override
	protected ValueGroup<T> generateNext() {
		T t = generator.next();
		return this.createSingleValue(t);
	}

}
